home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML Browsing & Building Cyberspace
/
VRML - Browsing and Building Cyberspace.iso
/
examples
/
24.wrl
< prev
next >
Wrap
Text File
|
1995-06-29
|
10KB
|
370 lines
#VRML V1.0 ascii
# Example twenty-four - Explicit definition of a complex shape using Coordinate3 and IndexedFaceSet nodes
# I cheated and used the WCVT2POV.EXE tool to produce the VRML file.
# This started off as a DXF model of a sphere.
# Being good little VRML do-bees, we give the sphere a name.
DEF Sphere_White Separator {
# We give it a simple material to make it visible
Material {
diffuseColor 1.000000 1.000000 1.000000
ambientColor 0.100000 0.100000 0.100000
}
# The Coordinate3 node defines a set of points in space
# Which are used later in the IndexedFaceSet node
# Each row specifies the X Y Z position of a point.
Coordinate3 {
point [ # Begins the list of points
-0.382683 0.000000 0.923880, # Point Zero
-0.353553 0.146447 0.923880, # Point One
0.000000 0.000000 1.000000, # Point Two
-0.270598 0.270598 0.923880, # etc...
-0.146447 0.353553 0.923880,
0.000000 0.382683 0.923880,
0.146447 0.353553 0.923880,
0.270598 0.270598 0.923880,
0.353553 0.146447 0.923880,
0.382683 0.000000 0.923880,
0.353553 -0.146447 0.923880,
0.270598 -0.270598 0.923880,
0.146447 -0.353553 0.923880,
0.000000 -0.382683 0.923880,
-0.146447 -0.353553 0.923880,
-0.270598 -0.270598 0.923880,
-0.353553 -0.146447 0.923880,
-0.653282 0.270598 0.707107,
-0.707107 0.000000 0.707107,
-0.500000 0.500000 0.707107,
-0.270598 0.653282 0.707107,
0.000000 0.707107 0.707107,
0.270598 0.653282 0.707107,
0.500000 0.500000 0.707107,
0.653282 0.270598 0.707107,
0.707107 0.000000 0.707107,
0.653282 -0.270598 0.707107,
0.500000 -0.500000 0.707107,
0.270598 -0.653282 0.707107,
0.000000 -0.707107 0.707107,
-0.270598 -0.653282 0.707107,
-0.500000 -0.500000 0.707107,
-0.653282 -0.270598 0.707107,
-0.853553 0.353553 0.382683,
-0.923880 0.000000 0.382683,
-0.653282 0.653282 0.382683,
-0.353553 0.853553 0.382683,
0.000000 0.923880 0.382683,
0.353553 0.853553 0.382683,
0.653282 0.653282 0.382683,
0.853553 0.353553 0.382683,
0.923880 0.000000 0.382683,
0.853553 -0.353553 0.382683,
0.653282 -0.653282 0.382683,
0.353553 -0.853553 0.382683,
0.000000 -0.923880 0.382683,
-0.353553 -0.853553 0.382683,
-0.653282 -0.653282 0.382683,
-0.853553 -0.353553 0.382683,
-0.923880 0.382683 0.000000,
-1.000000 0.000000 0.000000,
-0.707107 0.707107 0.000000,
-0.382683 0.923880 0.000000,
0.000000 1.000000 0.000000,
0.382683 0.923880 0.000000,
0.707107 0.707107 0.000000,
0.923880 0.382683 0.000000,
1.000000 0.000000 0.000000,
0.923880 -0.382683 0.000000,
0.707107 -0.707107 0.000000,
0.382683 -0.923880 0.000000,
0.000000 -1.000000 0.000000,
-0.382683 -0.923880 0.000000,
-0.707107 -0.707107 0.000000,
-0.923880 -0.382683 0.000000,
-0.853553 0.353553 -0.382683,
-0.923880 0.000000 -0.382683,
-0.653282 0.653282 -0.382683,
-0.353553 0.853553 -0.382683,
0.000000 0.923880 -0.382683,
0.353553 0.853553 -0.382683,
0.653282 0.653282 -0.382683,
0.853553 0.353553 -0.382683,
0.923880 0.000000 -0.382683,
0.853553 -0.353553 -0.382683,
0.653282 -0.653282 -0.382683,
0.353553 -0.853553 -0.382683,
0.000000 -0.923880 -0.382683,
-0.353553 -0.853553 -0.382683,
-0.653282 -0.653282 -0.382683,
-0.853553 -0.353553 -0.382683,
-0.653281 0.270598 -0.707107,
-0.707107 0.000000 -0.707107,
-0.500000 0.500000 -0.707107,
-0.270598 0.653281 -0.707107,
0.000000 0.707107 -0.707107,
0.270598 0.653281 -0.707107,
0.500000 0.500000 -0.707107,
0.653281 0.270598 -0.707107,
0.707107 0.000000 -0.707107,
0.653281 -0.270598 -0.707107,
0.500000 -0.500000 -0.707107,
0.270598 -0.653281 -0.707107,
0.000000 -0.707107 -0.707107,
-0.270598 -0.653281 -0.707107,
-0.500000 -0.500000 -0.707107,
-0.653281 -0.270598 -0.707107,
-0.353553 0.146447 -0.923880,
-0.382683 0.000000 -0.923880,
-0.270598 0.270598 -0.923880,
-0.146447 0.353553 -0.923880,
0.000000 0.382683 -0.923880,
0.146447 0.353553 -0.923880,
0.270598 0.270598 -0.923880,
0.353553 0.146447 -0.923880,
0.382683 0.000000 -0.923880,
0.353553 -0.146447 -0.923880,
0.270598 -0.270598 -0.923880,
0.146447 -0.353553 -0.923880,
0.000000 -0.382683 -0.923880,
-0.146447 -0.353553 -0.923880,
-0.270598 -0.270598 -0.923880,
-0.353553 -0.146447 -0.923880,
0.000000 0.000000 -1.000000
]
}
# The IndexedFaceSet node takes the array of points defined
# In the Coordinate3 node, and forms triangular polygon faces
# Each polygon ends with a -1
IndexedFaceSet {
coordIndex [ # Begins the list of polygon faces
2, 1, 0, -1,
2, 3, 1, -1,
2, 4, 3, -1,
2, 5, 4, -1,
2, 6, 5, -1,
2, 7, 6, -1,
2, 8, 7, -1,
2, 9, 8, -1,
2, 10, 9, -1,
2, 11, 10, -1,
2, 12, 11, -1,
2, 13, 12, -1,
2, 14, 13, -1,
2, 15, 14, -1,
2, 16, 15, -1,
2, 0, 16, -1,
0, 1, 17, -1,
0, 17, 18, -1,
1, 3, 19, -1,
1, 19, 17, -1,
3, 4, 20, -1,
3, 20, 19, -1,
4, 5, 21, -1,
4, 21, 20, -1,
5, 6, 22, -1,
5, 22, 21, -1,
6, 7, 23, -1,
6, 23, 22, -1,
7, 8, 24, -1,
7, 24, 23, -1,
8, 9, 25, -1,
8, 25, 24, -1,
9, 10, 26, -1,
9, 26, 25, -1,
10, 11, 27, -1,
10, 27, 26, -1,
11, 12, 28, -1,
11, 28, 27, -1,
12, 13, 29, -1,
12, 29, 28, -1,
13, 14, 30, -1,
13, 30, 29, -1,
14, 15, 31, -1,
14, 31, 30, -1,
15, 16, 32, -1,
15, 32, 31, -1,
16, 0, 18, -1,
16, 18, 32, -1,
18, 17, 33, -1,
18, 33, 34, -1,
17, 19, 35, -1,
17, 35, 33, -1,
19, 20, 36, -1,
19, 36, 35, -1,
20, 21, 37, -1,
20, 37, 36, -1,
21, 22, 38, -1,
21, 38, 37, -1,
22, 23, 39, -1,
22, 39, 38, -1,
23, 24, 40, -1,
23, 40, 39, -1,
24, 25, 41, -1,
24, 41, 40, -1,
25, 26, 42, -1,
25, 42, 41, -1,
26, 27, 43, -1,
26, 43, 42, -1,
27, 28, 44, -1,
27, 44, 43, -1,
28, 29, 45, -1,
28, 45, 44, -1,
29, 30, 46, -1,
29, 46, 45, -1,
30, 31, 47, -1,
30, 47, 46, -1,
31, 32, 48, -1,
31, 48, 47, -1,
32, 18, 34, -1,
32, 34, 48, -1,
34, 33, 49, -1,
34, 49, 50, -1,
33, 35, 51, -1,
33, 51, 49, -1,
35, 36, 52, -1,
35, 52, 51, -1,
36, 37, 53, -1,
36, 53, 52, -1,
37, 38, 54, -1,
37, 54, 53, -1,
38, 39, 55, -1,
38, 55, 54, -1,
39, 40, 56, -1,
39, 56, 55, -1,
40, 41, 57, -1,
40, 57, 56, -1,
41, 42, 58, -1,
41, 58, 57, -1,
42, 43, 59, -1,
42, 59, 58, -1,
43, 44, 60, -1,
43, 60, 59, -1,
44, 45, 61, -1,
44, 61, 60, -1,
45, 46, 62, -1,
45, 62, 61, -1,
46, 47, 63, -1,
46, 63, 62, -1,
47, 48, 64, -1,
47, 64, 63, -1,
48, 34, 50, -1,
48, 50, 64, -1,
50, 49, 65, -1,
50, 65, 66, -1,
49, 51, 67, -1,
49, 67, 65, -1,
51, 52, 68, -1,
51, 68, 67, -1,
52, 53, 69, -1,
52, 69, 68, -1,
53, 54, 70, -1,
53, 70, 69, -1,
54, 55, 71, -1,
54, 71, 70, -1,
55, 56, 72, -1,
55, 72, 71, -1,
56, 57, 73, -1,
56, 73, 72, -1,
57, 58, 74, -1,
57, 74, 73, -1,
58, 59, 75, -1,
58, 75, 74, -1,
59, 60, 76, -1,
59, 76, 75, -1,
60, 61, 77, -1,
60, 77, 76, -1,
61, 62, 78, -1,
61, 78, 77, -1,
62, 63, 79, -1,
62, 79, 78, -1,
63, 64, 80, -1,
63, 80, 79, -1,
64, 50, 66, -1,
64, 66, 80, -1,
66, 65, 81, -1,
66, 81, 82, -1,
65, 67, 83, -1,
65, 83, 81, -1,
67, 68, 84, -1,
67, 84, 83, -1,
68, 69, 85, -1,
68, 85, 84, -1,
69, 70, 86, -1,
69, 86, 85, -1,
70, 71, 87, -1,
70, 87, 86, -1,
71, 72, 88, -1,
71, 88, 87, -1,
72, 73, 89, -1,
72, 89, 88, -1,
73, 74, 90, -1,
73, 90, 89, -1,
74, 75, 91, -1,
74, 91, 90, -1,
75, 76, 92, -1,
75, 92, 91, -1,
76, 77, 93, -1,
76, 93, 92, -1,
77, 78, 94, -1,
77, 94, 93, -1,
78, 79, 95, -1,
78, 95, 94, -1,
79, 80, 96, -1,
79, 96, 95, -1,
80, 66, 82, -1,
80, 82, 96, -1,
82, 81, 97, -1,
82, 97, 98, -1,
81, 83, 99, -1,
81, 99, 97, -1,
83, 84, 100, -1,
83, 100, 99, -1,
84, 85, 101, -1,
84, 101, 100, -1,
85, 86, 102, -1,
85, 102, 101, -1,
86, 87, 103, -1,
86, 103, 102, -1,
87, 88, 104, -1,
87, 104, 103, -1,
88, 89, 105, -1,
88, 105, 104, -1,
89, 90, 106, -1,
89, 106, 105, -1,
90, 91, 107, -1,
90, 107, 106, -1,
91, 92, 108, -1,
91, 108, 107, -1,
92, 93, 109, -1,
92, 109, 108, -1,
93, 94, 110, -1,
93, 110, 109, -1,
94, 95, 111, -1,
94, 111, 110, -1,
95, 96, 112, -1,
95, 112, 111, -1,
96, 82, 98, -1,
96, 98, 112, -1,
98, 97, 113, -1,
97, 99, 113, -1,
99, 100, 113, -1,
100, 101, 113, -1,
101, 102, 113, -1,
102, 103, 113, -1,
103, 104, 113, -1,
104, 105, 113, -1,
105, 106, 113, -1,
106, 107, 113, -1,
107, 108, 113, -1,
108, 109, 113, -1,
109, 110, 113, -1,
110, 111, 113, -1,
111, 112, 113, -1,
112, 98, 113, -1
]
}
}